package io.renren.modules.generator.service.impl;

import org.springframework.stereotype.Service;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import io.renren.common.utils.PageUtils;
import io.renren.common.utils.Query;

import io.renren.modules.generator.dao.TbUserMovieCommentDao;
import io.renren.modules.generator.entity.TbUserMovieCommentEntity;
import io.renren.modules.generator.service.TbUserMovieCommentService;


@Service("tbUserMovieCommentService")
public class TbUserMovieCommentServiceImpl extends ServiceImpl<TbUserMovieCommentDao, TbUserMovieCommentEntity> implements TbUserMovieCommentService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        QueryWrapper<TbUserMovieCommentEntity> qw = new QueryWrapper<>();
        qw.eq("user_id",params.get("userId"));
        IPage<TbUserMovieCommentEntity> page = this.page(
                new Query<TbUserMovieCommentEntity>().getPage(params),
                qw
        );

        return new PageUtils(page);
    }

}